spotify-lyrics - #214
Conversation
|
I have made the required changes suggested in the previous PR and I request you to check this and feel free to point out anything you think needs to be changed |
The manifest declares no dependencies, but spotify-lyrics/spotify_lyrics_daemon.py:6 requires the syncedlyrics Python package and spotify-lyrics/spotify_lyrics_daemon.py:101executes playerctl. The Python runtime is also required to run the daemon. spotify-lyrics/README.md:20 documents only part of this requirement outside the template's required This hides mandatory runtime prerequisites from the catalog and plugin metadata. Declare all runtime requirements in dependencies and document the matching exact names under |
…update README requirements
Commit ef91e6f modifies the existing h465855hgg/lyrics plugin, although this PR declares itself as a new goatnath/spotify-lyrics plugin and attests that it touches exactly one plugin directory. Remove the lyrics/lyrics.luau change from this PR. Any update to the existing lyrics plugin should be reviewed separately with its own manifest version bump and functional scope. |
This reverts commit ef91e6f.
…rapping height prediction
…dimension animations
…base Root cause: the charUnits per-character width estimation consistently underestimated real rendered widths because the 0.80 multipliers in getLineWidth and getLinesCount cancelled each other out, making the effective calculation ignore the safety margin entirely. Fix: replaced the complex charUnits/toChars/getLineWidth machinery with a simple #text / chars-per-line heuristic using a conservative 0.60x character width factor. This reliably overestimates line count, ensuring the panel always allocates enough height for wrapped text. Quality of life improvements: - Split monolithic render() into renderEmpty/renderPaused/renderPlaying - Reduced update interval from 33ms (30 FPS) to 100ms (10 FPS) - Removed file-read timer (reads every frame at lower FPS instead) - Added clear section headers and inline documentation - Removed all dead code (charUnits, toChars, getLineWidth, etc.)
… fix The root cause of the lyrics spilling was never in the Lua code. Noctalia panels are sized exclusively by plugin.toml, not by minHeight on the column layout. Since we had removed width/height from plugin.toml to make sizing 'dynamic', noctalia used a tiny default that couldn't contain wrapped lyrics. minHeight on ui.column had zero effect on the actual panel window size. Set height=280 to comfortably fit 3 lyrics lines even when they wrap.
Long lyrics (>40 chars) now get progressively smaller fonts: - Every 15 chars beyond 40 reduces font by 2px - Minimum font: 10px (panel) / 11px (widget) This prevents vertical overflow regardless of container size by ensuring long lines take up less vertical space when they wrap.
- Updated bar.luau to toggle correct panel ID - Replaced ~ in noctalia.readFile with absolute path since Lua doesn't auto-expand it - Updated plugin.toml height to 280 and id to noctalia/spotify-lyrics
Plugin
<goatnath/spotify-lyrics>plugin.toml)What it does
Adds a seamless, time-synced scrolling lyrics panel for the Noctalia desktop shell. It integrates directly into the Noctalia bar via a small glyph next to the media widget, which toggle an auto-scrolling lyrics card pulled from a background daemon.
External dependencies
Requires
playerctland thesyncedlyricsPython package. It uses a standalone background Python daemon (spotify_lyrics_daemon.py) to monitor media state and fetch lyrics without needing Spotify API keys. The plugin reads state locally from~/.cache/noctalia/lyrics/current.json.Testing
Screenshots / Videos
recording_20260805_213318.mp4
Checklist
idafter the/inplugin.tomlexactly.plugin.toml,README.md,thumbnail.webp, andtranslations/en.json.README.mdfollows theREADME template, documents
every entry id and dependency, and includes exact panel IPC commands and launcher prefixes where applicable.
thumbnail.webpwith the thumbnail generator.versionfollows semver and is bumped in this PR;plugin_apiis the oldest API level this plugin requires.understand that language well enough to review and maintain it (no unreviewed machine/LLM translations).
catalog.toml; CI generates it.Code review attestation
Plugins run as trusted, unsandboxed Luau in the user's session. Confirm:
licensedeclared inplugin.toml.